<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./echarts.js"></script>
</head>

<body>
    <div style="width: 100%;height:800px" id="main"></div>
</body>

</html>
<script>
    let main = document.querySelector('#main')
    let obj = echarts.init(main)
    let option = {
        title: {
            text: '雷达图'
        },
        // 只适用于雷达图
        radar: [
            {
                // 圆形
                shape:'circle',
                // 雷达图的指示器，用来指示雷达图里多个变量
                indicator: [
                    {
                        name: '蔬菜', max: 6500
                    },
                    {
                        name: '水果', max: 16000
                    },
                    {
                        name: '熟食', max: 30000
                    },
                    {
                        name: '数码', max: 38000
                    },
                    {
                        name: '家电', max: 52000
                    },
                    {
                        name: '日化', max: 25000
                    },
                ]
            }
        ],
        series:[ 
            {
                // 雷达图
                type:'radar',
                data:[ 
                    { 
                        value:[4200,5300,6666,2345,1234,4567]
                    }
                ]
            }
        ]
    }
    obj.setOption(option)
</script>